<?php
$m_slider = new M_slider_images();
$dt_slider = $m_slider->get();

$n = 0;
foreach ($dt_slider as $dt) {
    $n++;
}

if ($this->router->fetch_class() == "produk") {
    ?>
    <div class="container">
        <div class="sixteen columns">
            <div class="my_slider">
                <?php
                if ($n >= 1) {
                    ?>

                    <!-- Captions for Orbit -->
                    <div id="featured"> 
                        <?php
                        $z = 1;
                        foreach ($dt_slider as $lt) {
                            echo "<img style='width: 918px;' data-caption='#htmlCaption" . $z . "'  src='" . base_url() . "uploads/slider/$lt->image_slider' />";
                            echo "<span class='orbit-caption' id='htmlCaption" . $z . "'>$lt->keterangan_slider</span>";
                            $z++;
                        }
                        ?>

                    </div>
                    <!-- Captions for Orbit -->
                    <?php
                }
                ?>
            </div>
        </div>
    </div>
    <div class="clear"></div>

    <?php
}
?>